import request from '@/utils/request'

const api = {
  overview: '/data-statistics/overview',
  device: '/data-statistics/device',
  task: '/data-statistics/task',
  repair: '/data-statistics/repair',
  trend: '/data-statistics/trend'
}

export default {
  // 获取数据概览
  overview(params) {
    return request({
      url: api.overview,
      method: 'get',
      params
    })
  },
  
  // 获取设备统计
  deviceStatistics(params) {
    return request({
      url: api.device,
      method: 'get',
      params
    })
  },
  
  // 获取任务统计
  taskStatistics(params) {
    return request({
      url: api.task,
      method: 'get',
      params
    })
  },
  
  // 获取维修统计
  repairStatistics(params) {
    return request({
      url: api.repair,
      method: 'get',
      params
    })
  },
  
  // 获取趋势统计
  trend(params) {
    return request({
      url: api.trend,
      method: 'get',
      params
    })
  }
}